home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / powervww / tproject.h < prev    next >
C/C++ Source or Header  |  1998-01-05  |  4KB  |  102 lines

  1. //  ____________________________________________________
  2. // |                                                    |
  3. // |  Project:     POWER VIEW IDE                       |
  4. // |  File:        TPROJECT.H                           |
  5. // |  Compiler:    WPP386 (10.6)                        |
  6. // |                                                    |
  7. // |  Subject:     Tproject class interface             |
  8. // |                                                    |
  9. // |  Author:      Emil Dotchevski                      |
  10. // |____________________________________________________|
  11. //
  12. // E-mail: zajo@geocities.com
  13. // URL:    http://www.geocities.com/SiliconValley/Bay/3577
  14.  
  15. #include "THIDE.H"
  16. #include "OPTIONS.H"
  17.  
  18. #ifndef _TPROJECT_H_INCLUDED
  19. #define _TPROJECT_H_INCLUDED
  20.  
  21.   #define cxPROJECT             100
  22.   #define cmPRJ_ADD             cmUSER10
  23.   #define cmPRJ_INS             cmUSER11
  24.   #define cmPRJ_EDIT_FILE       cmOK
  25.   #define cmPRJ_DEL             cmUSER12
  26.   #define cmPRJ_OPTIONS         cmUSER13
  27.   #define cmPRJ_DEPENDS         cmUSER14
  28.  
  29.   #define FIRST_MAKE            prj_compiler_options.memory_model==0
  30.   #define FIRST_LINK            prj_linker_options.stack_size==0
  31.   #define peDONT_LINK           0x0001
  32.   #define peAUTO_DEPENDENCY     0x0002
  33.   #define peBUILD               0x0004
  34.   #define peEXCLUSIVE           0x0008
  35.  
  36.   struct Tproject_entry
  37.   {
  38.     uint options;
  39.     char *command_line;
  40.     char *compiler;
  41.     Tlb_list *depends;
  42.     char target[_MAX_PATH];
  43.     char filename[_MAX_PATH];
  44.   };
  45.   #define TPROJECT_ENTRY_SIZE   (sizeof(Tproject_entry)-_MAX_PATH)
  46.  
  47.   class Tproject: public Thide_on_close
  48.   {
  49.     public:
  50.       char filename[_MAX_PATH];
  51.       Tcompiler_options prj_compiler_options;
  52.       Tlinker_options prj_linker_options;
  53.       Tproject( char *_filename, int _xl, int _yl, boolean show_error );
  54.       virtual void fetch( char *buffer, uint row, uint column, uint width );
  55.       void set_title( void );
  56.       boolean save( void ); //save file (prompt the user if no name)
  57.       boolean save_as( void ); //prompt the user and save the file
  58.       boolean save_project( void ); //write project to disk
  59.       void new_project_entry( uint i, char *_filename );
  60.       void add_entry( void ); //prompt the user and add file to the project
  61.       void ins_entry( uint i ); //prompt the user and ins file to the project
  62.       void edit_file( uint i ); //pop up edit window for selected file
  63.       void del_entry( uint i ); //erase project item
  64.       void dependency( uint i ); //specify dependency list for selected file
  65.       void export( void ); //export make file
  66.       void local_options( uint i ); //set local options for selected file
  67.       boolean entry_valid( uint i );
  68.       boolean exe_valid( boolean general );
  69.       boolean build_entry( uint i ); //build project entry
  70.       boolean make_entry( uint i ); //build project entry if needed
  71.       boolean make( void ); //make the project
  72.       boolean build( void ); //build the project
  73.       boolean link( boolean general ); //link the project
  74.  
  75.     protected:
  76.       virtual void event_handler( Tevent &ev );
  77.       virtual void update_commands( void );
  78.   };
  79.  
  80. #endif //_TPROJECT_H_INCLUDED
  81.  
  82.  
  83. #ifdef _DECLARE_TPROJECT_H
  84.   #define GLOBAL
  85. #else
  86.   #define GLOBAL extern
  87. #endif
  88.   GLOBAL Tproject *project;
  89. #undef GLOBAL
  90.  
  91. void open_project( char *filename, boolean show_error );
  92. void project_open( void );
  93. void win_project( void );
  94. boolean project_build( void );
  95. boolean project_make( void );
  96. void project_run( void );
  97. void project_params( void );
  98. void project_export( void );
  99. void project_close( void );
  100. boolean project_compile( void );
  101. boolean project_link( void );
  102.